package bookManage.Model.service;

import bookManage.Model.dao.DaoImpl;
import bookManage.Model.entity.Book;
import bookManage.Model.entity.BookContent;
import bookManage.Model.entity.BookShow;

import java.sql.SQLException;
import java.util.List;

/**
 * @BelongsProject: library-management-system-master
 * @BelongsPackage: bookManage.Model.service
 * @Author: yuan wang
 * @CreateTime: 2023-02-05  21:12
 * @Description: Service接口的实现类
 * @Version: 1.0
 */
public class ServiceImpl implements Service {
    DaoImpl dao = new DaoImpl();

    @Override
    public int addBook(Book book) throws SQLException {
        return dao.addBook(book);
    }

    @Override
    public int delBook(int id) throws SQLException {
        return dao.delBook(id);
    }

    @Override
    public int editBook(Book book, String oldNumber) throws SQLException {
        return dao.editBook(book, oldNumber);
    }

    @Override
    public List<BookShow> queryBook(String status) throws SQLException {
        return dao.queryBook(status);
    }

    @Override
    public Book queryBookContent(String number) throws SQLException {
        return dao.queryBookContent(number);
    }

    @Override
    public List<BookContent> queryBookContentList(String number) throws SQLException {
        return dao.queryBookContentList(number);
    }

    @Override
    public List<BookShow> dimQueryBook(String bookName) throws SQLException {
        return dao.dimQueryBook(bookName);
    }


}
